package com.example.demo.admin.controller;

import com.example.demo.admin.biz.service.AdminDemoService;
import com.example.demo.admin.common.pojo.request.IntegralRuleRsp;
import com.example.demo.commons.result.common.entity.BizResult;
import com.example.demo.commons.result.common.entity.PageData;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: xlq
 * @Date: 2024/4/19
 * @Description:
 */
@RestController
@RequestMapping("/a")
public class AdminDemoController {

    @Autowired
    private AdminDemoService adminDemoService;

    @Operation(summary = "查询社区积分规则")
    @PostMapping("/list")
    public BizResult<PageData<IntegralRuleRsp>> listIntegralConfig(@RequestBody IntegralRuleRsp integralRuleRsp) {

        PageData<IntegralRuleRsp> integralRuleRspPageData = adminDemoService.listIntegralRule(integralRuleRsp);
        return BizResult.create(integralRuleRspPageData);
    }
}
